/*
 * $Id: SomeBean.java 16 2014-08-22 10:12:14Z ratking $
 *
 * Copyleft (C) 2014 RatKing. All wrongs reserved.
 */
package cn.ratking.demo.jaws7.security.view;

import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.inject.Named;

import org.apache.shiro.authz.annotation.RequiresRoles;
import org.slf4j.Logger;

import cn.ratking.demo.jaws7.security.qualifier.ShiroSecured;

@Named
@RequestScoped
@ShiroSecured
public class SomeBean {

    @Inject
    private transient Logger log;

    @RequiresRoles("ADMIN")
    public void doSomethingWhichIsOnlyAllowedByADMIN() {
        // ...
        log.debug("Debug: SomeBean.doSomethingWhichIsOnlyAllowedByADMIN()");
    }
}
